uncompile6 in pip list but i can use it - windows

I try install uncompyle6 for decompyle .pyc file. I install it with pip install uncompyle6, so I can see it with pip list, but I recieve a message: "not recognized as an internal or external command". How can I fix it? My OS: Windows 10.

Related

installing eth-brownie with pipx

I have been attempting to install Brownie via pipx in a Powershell terminal in VSCode (https://eth-brownie.readthedocs.io/en/stable/install.html). As in the link I attempted the first two commands after which the system gave me confirmation that pipx had been added to PATH:
python -m pip install --user pipx
python -m pipx ensurepath
...
C:\Users\Name\AppData\Roaming\Python\Python310\Scripts has been been added to PATH, but you need to open a new terminal or re-login for this PATH change to
take effect.
C:\Users\Name\.local\bin has been been added to PATH, but you need to open a new terminal or re-login for this PATH change to take effect.
You will need to open a new terminal or re-login for the PATH changes to take effect.
Otherwise pipx is ready to go! ✨ 🌟 ✨
Upon loading a new Powershell, I tried the final command as in the link, but instead got the error immediately below:
pipx install eth-brownie
...
pipx : The term 'pipx' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1
+ pipx install eth-brownie
+ ~~~~
+ CategoryInfo : ObjectNotFound: (pipx:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Why is pipx not being recognized as a command if the output claimed it is accessible on PATH? In any case, I then tried modifying the command to include python -m at the start. My understanding is that this goes to my python program first, then accesses anything to do with pipx? It ran for a few seconds before printing a different error:
python -m pipx install eth-brownie
...
Fatal error from pip prevented installation. Full pip output in file:
C:\Users\Name\.local\pipx\logs\cmd_2022-01-05_20.58.07_pip_errors.log
pip failed to build package:
cytoolz
Some possibly relevant errors from pip install:
build\lib.win-amd64-3.10\cytoolz\functoolz.cp310-win_amd64.pyd : fatal error LNK1120: 1 unresolved externals
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio\\2019\\BuildTools\\VC\\Tools\\MSVC\\14.29.30133\\bin\\HostX86\\x64\\link.exe' failed with exit code 1120
Error installing eth-brownie.
I am at a loss on this error. My instinct tells me there is something wrong with my Microsoft Build Tools that I downloaded from: https://visualstudio.microsoft.com/visual-cpp-build-tools/Code . But if I can resolve the first issue perhaps this is redundant.
Make sure you have installed "pipx" from python3
if it is not installed, run
python3 -m pip install --user pipx
Or check env see if it is installed path
I also had the same error before, I tried with another environment from python
py -m pip install --user -U pipx
Best way to test pipx, checkin to directory :
C:\Users\...\.local
Add env
enter image description here
You will need to open a new terminal or re-login for the PATH changes to take effect.
Otherwise pipx is ready to go
I restarted my machine and was able to recognize pipx at least, but upon using "pipx install eth-brownie" I got the same fatal error as at the bottom of my post. I then verified I had cython and cytoolz installed (tried pip install for each and received output stating that the requirement was already satisfied) even though the error stated "pip failed to build package: cytoolz" In the end I found some posts suggesting that pipx only works for Python 3.9. I finally tried a pip install of eth-brownie rather than pipx and that worked.
If anyone knows of any potential pitfalls of a pip rather than pipx installation of eth-brownie I would be glad to hear, but at least it was installed in the end.

How do I pip install pandas under the new system?

I have pip installed many packages using the windows powershell from my python 37 window, but havent for a few months and now I am getting an error instead of an install.
I have tried installing two packages (pandas and numpy) and get the same results for both.
I tried switching pip and pandas, as well as pip and the file name (including extension) and received no favorable results. When I type in the name of the module it returns that there is no module with that name, when I type in the full file name for the module it tells me that numpy-1 does not exist.
As you will see in the next section the problem seems to be that the pypi.org format for pip installing seems to have changed when I wasn't paying attention.
my code (which has worked in the past) looks like this
py -3.7 -m pip install numpy-1.16.2-cp37-cp37m-win_amd64.whl
the error looks like this
PS C:\Users\Hezekiah\AppData\Local\Programs\Python\Python37> py -3.7 -m pip install numpy-1.16.2-cp37-cp37m-win_amd64.whl
C:\Users\Hezekiah\AppData\Local\Programs\Python\Python37\python.exe: No module named pip
I expect my pip install code to install numpy, instead it tells me that pip is not a module.
follow steps
1.open cmd
2.give full path to the script folder
e.g.
C:\Python37-32\Scripts
3.then try pip commands
pip install pandas
C:\Python37-32\Scripts>pip install pandas

PySide Installation

I'm trying to install the PySide on python 3.5 (32-bit) on windows 10, I installed the pip, it's ok, but when I run the command 'easy_install' at cmd, shows this:
Subtitle: "-U" is not recognized as an internal or external command, operable program or batch file
When I run the command 'import easy_install' on python's console, it's ok nothing is shown here, but When I run "import PySide' shows the error 'ImportError: No module named 'PySide'"
Anyone knows why it occurs?
I don't have any experience using easy_install, but I wonder if you should try --upgrade instead of -U. Also, don't know if you want the upgrade flag at all if you don't have the package installed in the first place.
You mentioned you have pip installed, so you can install PySide like this:
python -m pip install PySide
Or if you are trying to upgrade PySide:
python -m pip install PySide
Note that you'll need python in your PATH environment variable, otherwise you'll need to provide the full path to the python interpreter, wherever that may be on your system:
C:/python27/python.exe -m pip install --upgrade PySide

Python 3.5.1 pip install 'ImportError'

While using pip install I am getting the following error:
Error while finding spec for 'pip__main__' <: No module named 'urllib.request'; 'urllib' is not a package>; 'pip' is a package and cannot be directly executed
Any advice on this one?
I thought maybe it was related to the requests module itself but I tried to download other modules and had the same problem.
I've just upgraded from Python 3.3 to v3.5.1 on Windows and hit the same error message. I understand it's not the same as your problem.
It seems that the instructions from the docs to use:
python -m pip install SomePackage
are wrong, at least for Windows because I get the error message quoted by the OP.
I forgot to add the Scripts directory to my path, the same as previous releases. When I add it the problem is fixed. My path now has (for a default install of Python 3.5):
PATH=<blah>;%USERPROFILE%\AppData\Local\Programs\Python\Python35;%USERPROFILE%\AppData\Local\Programs\Python\Python35\Scripts
The pip executable is located in Scripts, so pip commands can now be executed directly, the same as always:
pip install urllib

Can't install psycopg2

I'm trying to install psycopg2 so I can use PostgreSQL in Python and Django. I have run into multiple errors in the last few hours trying to install it, and can't seem to solve the latest one. When I run:
setup.py install
on the psycopg2 in the command console it attempts to install it, but then gives an error when trying to execute link.exe in the Visual Studio 8 folder.
This doesn't make sense to me, considering I got that executable to work when I launch it from Windows Explorer, and from the command console. I even made an environment variable for it. However, it keeps giving:
"error: command C:\Program Files(x86)\Microsoft Visual Studio 9.0\VC\BIN\link.exe" failed with exit status 1120
In case anyone goes down this rabbit hole also, make sure your pip is up-to-date:
$ pip install -U pip
$ pip install psycopg2-binary
See: http://initd.org/psycopg/docs/install.html.
That's 3 hours of my life I won't get back.
Turns out this 3 and a half hour process I've been going through was unecessary. an exe installer of psycopg2 can be downloaded from here
Had the same problem.
Image of the error message
first run
sudo apt install libpq-dev python3-dev
then
pip3 install psycopg2
Go to https://pypi.org/project/psycopg2.
In release history select the version you want to download: there will be a table with files and compatible versions of Python.
Download the binary file that matches your system configuration.
For example, for Python 3.6 on Windows 10 (64-bit) download psycopg2-2.8.6-cp36-cp36m-win_amd64.whl.

Resources