In short:
sudo apt - get remove python - pip
wget https: //bootstrap.pypa.io/get-pip.py
sudo python get - pip.py
Make sure your setuptools and pip are up to date:
sudo pip install--upgrade setuptools
sudo pip install--upgrade pip
This issue tracker has been migrated to GitHub, and is currently read-only. For more information, see the GitHub FAQs in the Python's Developer Guide.
After all, I am trying to install the dev version of Numpy and the other libs.Unfortunately, I am still unable to install them.I have some assertion errors:
ERROR: Exception:
Traceback(most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/cli/base_command.py", line 188, in main
status = self.run(options, args)
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/commands/install.py", line 398, in run
installed = install_given_reqs(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/req/__init__.py", line 54, in install_given_reqs requirement.install(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 925, in install self.move_wheel_files(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/req/req_install.py", line 453, in move_wheel_files wheel.move_wheel_files(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/wheel.py", line 324, in move_wheel_files scheme = distutils_scheme(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/locations.py", line 104, in distutils_scheme assert not(home and prefix), "home={} prefix={}".format(home, prefix) AssertionError: home = /private/tmp / pip - target - 4 p5evqc_ prefix = /private/tmp / pip - build - env - b27ru_1v / overlay
That 's the first time I see such an issue and googling doesn'
t resolve it at all
NumPy has a very complex build and install process including supplying its own modified version of Distutils.You should take up any build and install issues first with the NumPy project and then,
if you both agree that there appears to be a problem in Python itself, re - open an issue here.We really are not in a position to debug NumPy installs here.
Well I have been looking through the interim commands running by the terminal. As far as I can see that’s not Numpy/scipy or whatever.
These are the setup tools, wheel and Cython. I may be wrong, but I guess these are pretty universal and are required by many functionalities of Python
sudo -H /Library/Frameworks/Python.framework/Versions/3.8/bin/python3.8 /Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/tmp/pip-build-env-b27ru_1v/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- setuptools wheel cython
Password:
Collecting setuptools
Using cached https://files.pythonhosted.org/packages/b2/86/095d2f7829badc207c893dd4ac767e871f6cd547145df797ea26baea4e2e/setuptools-41.2.0-py2.py3-none-any.whl
Collecting wheel
Using cached https://files.pythonhosted.org/packages/00/83/b4a77d044e78ad1a45610eb88f745be2fd2c6d658f9798a15e384b7d57c9/wheel-0.33.6-py2.py3-none-any.whl
Collecting cython
Installing collected packages: setuptools, wheel, cython
The error appeared right after running that command. So, is it still a Numpy issue?
> On 4 Sep 2019, at 19:10, Ned Deily <report@bugs.python.org> wrote:
>
>
> Ned Deily <nad@python.org> added the comment:
>
> NumPy has a very complex build and install process including supplying its own modified version of Distutils. You should take up any build and install issues first with the NumPy project and then, if you both agree that there appears to be a problem in Python itself, re-open an issue here. We really are not in a position to debug NumPy installs here.
>
> ----------
> resolution: -> third party
> stage: -> resolved
> type: crash ->
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <https: //bugs.python.org/issue38028>
> _______________________________________
The traceback you provide in the first message:
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/wheel.py", line 324, in move_wheel_files
scheme = distutils_scheme(
File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pip/_internal/locations.py", line 104, in distutils_scheme assert not(home and prefix), "home={} prefix={}".format(home, prefix) AssertionError: home = /private/tmp / pip - target - 4 p5evqc_ prefix = /private/tmp / pip - build - env - b27ru_1v / overlay
shows a reference to a Distutils data structure.As I noted above, NumPy has(or at least it used to have) its own customized version of Distutils.So that seems quite likely to be due to some incompatibility between the two versions of Distutil.
And, in any
case,
if it were to be determined that there is a problem with pip or setuptools or cython, each of those projects has its own issue tracker.Again, you should start with the NumPy project since they are the ones who make all these pieces work together by providing NumPy 's build and installation scripts.
I’m trying to run the code from this repository and I need to use Pytorch 1.4.0. I’ve installed the CPU only version of pytorch with pip install torch==1.4.0+cpu torchvision==0.5.0+cpu -f https://download.pytorch.org/whl/torch_stable.html.,You are using CPU only pytorch, but your code has statement like cr = nn.CrossEntropyLoss(weight=torch.tensor(classes_weights).cuda()) which is trying to move the tensor to GPU.,I’ve changed the number of GPU in the config to 0 and tried adding device = torch.device('cpu') at the begining of the program, but it’s not doing anything. How can I fix this error? I’m using windows 10 with python 3.7.9 if it helps
File "C:UsersusernameAppDataLocalProgramsPythonPython37librunpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:UsersusernameAppDataLocalProgramsPythonPython37librunpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:UsersusernameOneDriveDesktopemadeldeenAttnSleeptrain_Kfold_CV.py", line 94, in <module>
main(config, fold_id)
File "C:UsersusernameOneDriveDesktopemadeldeenAttnSleeptrain_Kfold_CV.py", line 65, in main
trainer.train()
File "C:UsersusernameOneDriveDesktopemadeldeenAttnSleepbasebase_trainer.py", line 66, in train
result, epoch_outs, epoch_trgs = self._train_epoch(epoch, self.epochs)
File "C:UsersusernameOneDriveDesktopemadeldeenAttnSleeptrainertrainer.py", line 49, in _train_epoch
loss = self.criterion(output, target, self.class_weights)
File "C:UsersusernameOneDriveDesktopemadeldeenAttnSleepmodelloss.py", line 6, in weighted_CrossEntropyLoss
cr = nn.CrossEntropyLoss(weight=torch.tensor(classes_weights).cuda())
File "C:UsersusernameAppDataLocalProgramsPythonPython37libsite-packagestorchcuda__init__.py", line 196, in _lazy_init
_check_driver()
File "C:UsersusernameAppDataLocalProgramsPythonPython37libsite-packagestorchcuda__init__.py", line 94, in _check_driver
raise AssertionError("Torch not compiled with CUDA enabled")
AssertionError: Torch not compiled with CUDA enabled
Fixed a bug where supervisord could crash if a subprocess exited immediately before trying to kill it.,when supervisord attempted to kill a process with SIGKILL after the process was not killed within “stopwaitsecs” using a “normal” kill signal, supervisord would crash with an improper AssertionError. Thanks to Calvin Hendryx-Parker.,Fixed a bug where supervisord would crash if the syslog handler was used and supervisord received SIGUSR2 (log reopen request).,Fixed an issue where supervisord could hang when responding to HTTP requests (including supervisorctl commands) if the system time was set back after supervisord was started.
When parsing “environment=” in the config file, changes introduced in 3.0a8 prevented Supervisor from parsing some characters commonly found in paths unless quoting was used as in this example:
environment = HOME = '/home/auser'
Supervisor once again allows the above line to be written as:
environment = HOME = /home/auser
Add reread, update, and avail commands based on Anders Quist’s online_config_reload.diff patch. This patch extends the “add” and “drop” commands with automagical behavior:
In supervisorctl:
supervisor > status
bar RUNNING pid 14864, uptime 18: 03: 42
baz RUNNING pid 23260, uptime 0: 10: 16
foo RUNNING pid 14866, uptime 18: 03: 42
gazonk RUNNING pid 23261, uptime 0: 10: 16
supervisor > avail
bar in use auto 999: 999
baz in use auto 999: 999
foo in use auto 999: 999
gazonk in use auto 999: 999
quux avail auto 999: 999
Now we add this to our conf:
[group: zegroup]
programs = baz, gazonk
Then we reread conf:
supervisor > reread
baz: disappeared
gazonk: disappeared
quux: available
zegroup: available
supervisor > avail
bar in use auto 999: 999
foo in use auto 999: 999
quux avail auto 999: 999
zegroup: baz avail auto 999: 999
zegroup: gazonk avail auto 999: 999
supervisor > status
bar RUNNING pid 14864, uptime 18: 04: 18
baz RUNNING pid 23260, uptime 0: 10: 52
foo RUNNING pid 14866, uptime 18: 04: 18
gazonk RUNNING pid 23261, uptime 0: 10: 52
The magic make - it - so command:
supervisor > update
baz: stopped
baz: removed process group
gazonk: stopped
gazonk: removed process group
zegroup: added process group
quux: added process group
supervisor > status
bar RUNNING pid 14864, uptime 18: 04: 43
foo RUNNING pid 14866, uptime 18: 04: 43
quux RUNNING pid 23561, uptime 0: 00: 02
zegroup: baz RUNNING pid 23559, uptime 0: 00: 02
zegroup: gazonk RUNNING pid 23560, uptime 0: 00: 02
supervisor > avail
bar in use auto 999: 999
foo in use auto 999: 999
quux in use auto 999: 999
zegroup: baz in use auto 999: 999
zegroup: gazonk in use auto 999: 999
The configuration for FastCGI programs is the same as regular programs except an additional “socket” parameter. Substitution happens on the socket parameter with the here and program_name variables:
[fcgi - program: fcgi_test];
socket = tcp: //localhost:8002
socket = unix: ///path/to/fcgi/socket
The password value in both the [inet_http_server] and [unix_http_server] sections can now optionally be specified as a SHA hexdigest instead of as cleartext. Values prefixed with {SHA} will be considered SHA hex digests. To encrypt a password to a form suitable for pasting into the configuration file using Python, do, e.g.:
>>>
import sha
>>>
'{SHA}' + sha.new('thepassword').hexdigest()
'{SHA}82ab876d1387bfafe46cc1c8a2ef074eae50cb1d'
In the new protocol, the listener must write the string:
RESULT { resultlen }\ n { result }
For example, to signify OK:
RESULT 2\ nOK
To signify FAIL:
RESULT 4\ nFAIL
The event listener protocol header is now a sequence of key-value pairs rather than a list of positional values. Previously, a representative header looked like:
SUPERVISOR3 .0 PROCESS_COMMUNICATION_STDOUT 30 22\ n
Now it looks like:
ver: 3.0 server: supervisor serial: 21...
Add pip inspect command to obtain the list of installed distributions and other information about the Python environment, in JSON format. (#11245),This fixes an AssertionError that occurred when determining installation order, for a very specific combination of upgrading-already-installed-package + change of dependencies + fetching some packages from a package index. This combination was especially common in Read the Docs’ builds. (#10851),Fix an issue where distutils installed projects were not actually uninstalled and deprecate attempting to uninstall them altogether.,Fixed a regression introduced in 1.2 about raising an exception when not finding any files to uninstall in the current environment. Thanks for the fix, Marcus Smith.
ERROR: Cannot uninstall foobar 0.1, RECORD file not found.You might be able to recover from this via: 'pip install --force-reinstall --no-deps foobar==0.1'.
ERROR: Cannot uninstall foobar 0.1, RECORD file not found.Hint: The package was installed by rpm.
$ curl - O https: //raw.github.com/pypa/pip/master/contrib/get-pip.py
$ python get - pip.py
pip install git + https: //github.com/pypa/pip/